package com.ce.server.controller;


import com.ce.server.pojo.Role;
import com.ce.server.service.IRoleService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 郑爽
 * @since 2021-11-14
 */
@RestController
@RequestMapping("/employee/role")
public class RoleController {
  @Autowired
  private IRoleService roleService;

  @ApiOperation(value = "获取所有角色")
  @GetMapping("/")
  public List<Role> getAllRecords(){
    return roleService.list();
  }

}
